//
//  String+Ext.swift
//  MasterBoy
//
//  Created by kyson on 2023/4/28.
//

import Foundation


extension String {
    
    /// 是否为空字符串
    var isBlank: Bool {
        // 扔掉 空格和换行符
        let trimmedStr = self.trimmingCharacters(in: .whitespacesAndNewlines)
        return trimmedStr.isEmpty
    }
    
    var length: Int {
        return self.utf16.count
    } 
}
